package cool.lichuan.zabbix.domain.problem;

import cool.lichuan.zabbix.util.FieldUtil.*;

import java.io.Serializable;
import java.util.List;

/**
 * 问题
 * @author LiChuan
 * @date 2021/11/5 11:03
 */
public class Problem implements Serializable {
    /** 问题事件的ID */
    @BeanField("eventid")
    private String eventId;
    /** 问题事件类型。 可能的值： 0-触发器创建的时间 3-内部事件 */
    private String source;
    /** 与问题事件相关的对象类型。 触发器时间可能的值： 0-触发器
        内部事件可能的值： 0-触发器 4-监控项 5-LLD规则 */
    private String object;
    /** 关联对象的ID。 */
    @BeanField("objectid")
    private String objectId;
    /** 问题事件创建的时间，时间戳（秒） */
    private Long clock;
    /** 问题事件创建的纳秒时间。 */
    private Long ns;
    /** 恢复时间的ID */
    @BeanField("r_eventid")
    private String rEventId;
    /** 恢复事件创建的时间，时间戳（秒） */
    @BeanField("r_clock")
    private Long rClock;
    /** 恢复事件创建的纳秒时间 */
    @BeanField("r_ns")
    private Long rNs;
    /** 事件被全局的关联规则恢复，关联规则的ID */
    @BeanField("correlationid")
    private String correlationId;
    /** 手动关闭问题的用户ID */
    private String userid;
    /** 解决问题名称 */
    private String name;
    /** 问题知晓状态 可能的值： 0-不知道 1-知道 */
    private String acknowledged;
    /** 问题当前级别 可能的值：  0-未定义 1-信息 2-警告 3-一般严重 4-严重 5-灾难 */
    private String severity;
    /** 是否抑制问题。 可能的值: 0 - 问题是一个正常状态; 1 - 问题被抑制 */
    private Integer suppressed;
    /** 更新的问题 */
    private List<Acknowledges> acknowledges;
    /** 问题标签。 */
    private List<Tags> tags;
    private List<Urls> urls;

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getObject() {
        return object;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    public Long getClock() {
        return clock;
    }

    public void setClock(Long clock) {
        this.clock = clock;
    }

    public Long getNs() {
        return ns;
    }

    public void setNs(Long ns) {
        this.ns = ns;
    }

    public String getrEventId() {
        return rEventId;
    }

    public void setrEventId(String rEventId) {
        this.rEventId = rEventId;
    }

    public Long getrClock() {
        return rClock;
    }

    public void setrClock(Long rClock) {
        this.rClock = rClock;
    }

    public Long getrNs() {
        return rNs;
    }

    public void setrNs(Long rNs) {
        this.rNs = rNs;
    }

    public String getCorrelationId() {
        return correlationId;
    }

    public void setCorrelationId(String correlationId) {
        this.correlationId = correlationId;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAcknowledged() {
        return acknowledged;
    }

    public void setAcknowledged(String acknowledged) {
        this.acknowledged = acknowledged;
    }

    public String getSeverity() {
        return severity;
    }

    public void setSeverity(String severity) {
        this.severity = severity;
    }

    public Integer getSuppressed() {
        return suppressed;
    }

    public void setSuppressed(Integer suppressed) {
        this.suppressed = suppressed;
    }

    public List<Acknowledges> getAcknowledges() {
        return acknowledges;
    }

    public void setAcknowledges(List<Acknowledges> acknowledges) {
        this.acknowledges = acknowledges;
    }

    public List<Tags> getTags() {
        return tags;
    }

    public void setTags(List<Tags> tags) {
        this.tags = tags;
    }

    public List<Urls> getUrls() {
        return urls;
    }

    public void setUrls(List<Urls> urls) {
        this.urls = urls;
    }

    @Override
    public String toString() {
        return "ProblemResp{" +
                "eventId='" + eventId + '\'' +
                ", source='" + source + '\'' +
                ", object='" + object + '\'' +
                ", objectId='" + objectId + '\'' +
                ", clock='" + clock + '\'' +
                ", ns='" + ns + '\'' +
                ", rEventId='" + rEventId + '\'' +
                ", rClock='" + rClock + '\'' +
                ", rNs='" + rNs + '\'' +
                ", correlationId='" + correlationId + '\'' +
                ", userid='" + userid + '\'' +
                ", name='" + name + '\'' +
                ", acknowledged='" + acknowledged + '\'' +
                ", severity='" + severity + '\'' +
                ", suppressed=" + suppressed +
                ", acknowledges=" + acknowledges +
                ", tags=" + tags +
                ", urls=" + urls +
                '}';
    }

    private static final long serialVersionUID = 3653673323067926281L;
}
